3.11 \(\int \csc ^7(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx\)

Optimal. Leaf size=130 \[ -\frac {a^2 c \cot ^5(e+f x)}{5 f}-\frac {a^2 c \cot ^3(e+f x)}{3 f}+\frac {a^2 c \tanh ^{-1}(\cos (e+f x))}{16 f}-\frac {a^2 c \cot (e+f x) \csc ^5(e+f x)}{6 f}+\frac {a^2 c \cot (e+f x) \csc ^3(e+f x)}{24 f}+\frac {a^2 c \cot (e+f x) \csc (e+f x)}{16 f} \]

[Out]

1/16*a^2*c*arctanh(cos(f*x+e))/f-1/3*a^2*c*cot(f*x+e)^3/f-1/5*a^2*c*cot(f*x+e)^5/f+1/16*a^2*c*cot(f*x+e)*csc(f
*x+e)/f+1/24*a^2*c*cot(f*x+e)*csc(f*x+e)^3/f-1/6*a^2*c*cot(f*x+e)*csc(f*x+e)^5/f

________________________________________________________________________________________

Rubi [A]  time = 0.19, antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 4, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2966, 3767, 3768, 3770} \[ -\frac {a^2 c \cot ^5(e+f x)}{5 f}-\frac {a^2 c \cot ^3(e+f x)}{3 f}+\frac {a^2 c \tanh ^{-1}(\cos (e+f x))}{16 f}-\frac {a^2 c \cot (e+f x) \csc ^5(e+f x)}{6 f}+\frac {a^2 c \cot (e+f x) \csc ^3(e+f x)}{24 f}+\frac {a^2 c \cot (e+f x) \csc (e+f x)}{16 f} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^7*(a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x]),x]

[Out]

(a^2*c*ArcTanh[Cos[e + f*x]])/(16*f) - (a^2*c*Cot[e + f*x]^3)/(3*f) - (a^2*c*Cot[e + f*x]^5)/(5*f) + (a^2*c*Co
t[e + f*x]*Csc[e + f*x])/(16*f) + (a^2*c*Cot[e + f*x]*Csc[e + f*x]^3)/(24*f) - (a^2*c*Cot[e + f*x]*Csc[e + f*x
]^5)/(6*f)

Rule 2966

Int[sin[(e_.) + (f_.)*(x_)]^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.
)*(x_)]), x_Symbol] :> Int[ExpandTrig[sin[e + f*x]^n*(a + b*sin[e + f*x])^m*(A + B*sin[e + f*x]), x], x] /; Fr
eeQ[{a, b, e, f, A, B}, x] && EqQ[A*b + a*B, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && IntegerQ[n]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \csc ^7(e+f x) (a+a \sin (e+f x))^2 (c-c \sin (e+f x)) \, dx &=\int \left (-a^2 c \csc ^4(e+f x)-a^2 c \csc ^5(e+f x)+a^2 c \csc ^6(e+f x)+a^2 c \csc ^7(e+f x)\right ) \, dx\\ &=-\left (\left (a^2 c\right ) \int \csc ^4(e+f x) \, dx\right )-\left (a^2 c\right ) \int \csc ^5(e+f x) \, dx+\left (a^2 c\right ) \int \csc ^6(e+f x) \, dx+\left (a^2 c\right ) \int \csc ^7(e+f x) \, dx\\ &=\frac {a^2 c \cot (e+f x) \csc ^3(e+f x)}{4 f}-\frac {a^2 c \cot (e+f x) \csc ^5(e+f x)}{6 f}-\frac {1}{4} \left (3 a^2 c\right ) \int \csc ^3(e+f x) \, dx+\frac {1}{6} \left (5 a^2 c\right ) \int \csc ^5(e+f x) \, dx+\frac {\left (a^2 c\right ) \operatorname {Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (e+f x)\right )}{f}-\frac {\left (a^2 c\right ) \operatorname {Subst}\left (\int \left (1+2 x^2+x^4\right ) \, dx,x,\cot (e+f x)\right )}{f}\\ &=-\frac {a^2 c \cot ^3(e+f x)}{3 f}-\frac {a^2 c \cot ^5(e+f x)}{5 f}+\frac {3 a^2 c \cot (e+f x) \csc (e+f x)}{8 f}+\frac {a^2 c \cot (e+f x) \csc ^3(e+f x)}{24 f}-\frac {a^2 c \cot (e+f x) \csc ^5(e+f x)}{6 f}-\frac {1}{8} \left (3 a^2 c\right ) \int \csc (e+f x) \, dx+\frac {1}{8} \left (5 a^2 c\right ) \int \csc ^3(e+f x) \, dx\\ &=\frac {3 a^2 c \tanh ^{-1}(\cos (e+f x))}{8 f}-\frac {a^2 c \cot ^3(e+f x)}{3 f}-\frac {a^2 c \cot ^5(e+f x)}{5 f}+\frac {a^2 c \cot (e+f x) \csc (e+f x)}{16 f}+\frac {a^2 c \cot (e+f x) \csc ^3(e+f x)}{24 f}-\frac {a^2 c \cot (e+f x) \csc ^5(e+f x)}{6 f}+\frac {1}{16} \left (5 a^2 c\right ) \int \csc (e+f x) \, dx\\ &=\frac {a^2 c \tanh ^{-1}(\cos (e+f x))}{16 f}-\frac {a^2 c \cot ^3(e+f x)}{3 f}-\frac {a^2 c \cot ^5(e+f x)}{5 f}+\frac {a^2 c \cot (e+f x) \csc (e+f x)}{16 f}+\frac {a^2 c \cot (e+f x) \csc ^3(e+f x)}{24 f}-\frac {a^2 c \cot (e+f x) \csc ^5(e+f x)}{6 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 204, normalized size = 1.57 \[ \frac {2 a^2 c \cot (e+f x)}{15 f}-\frac {a^2 c \csc ^6\left (\frac {1}{2} (e+f x)\right )}{384 f}+\frac {a^2 c \csc ^2\left (\frac {1}{2} (e+f x)\right )}{64 f}+\frac {a^2 c \sec ^6\left (\frac {1}{2} (e+f x)\right )}{384 f}-\frac {a^2 c \sec ^2\left (\frac {1}{2} (e+f x)\right )}{64 f}-\frac {a^2 c \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )}{16 f}+\frac {a^2 c \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{16 f}-\frac {a^2 c \cot (e+f x) \csc ^4(e+f x)}{5 f}+\frac {a^2 c \cot (e+f x) \csc ^2(e+f x)}{15 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^7*(a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x]),x]

[Out]

(2*a^2*c*Cot[e + f*x])/(15*f) + (a^2*c*Csc[(e + f*x)/2]^2)/(64*f) - (a^2*c*Csc[(e + f*x)/2]^6)/(384*f) + (a^2*
c*Cot[e + f*x]*Csc[e + f*x]^2)/(15*f) - (a^2*c*Cot[e + f*x]*Csc[e + f*x]^4)/(5*f) + (a^2*c*Log[Cos[(e + f*x)/2
]])/(16*f) - (a^2*c*Log[Sin[(e + f*x)/2]])/(16*f) - (a^2*c*Sec[(e + f*x)/2]^2)/(64*f) + (a^2*c*Sec[(e + f*x)/2
]^6)/(384*f)

________________________________________________________________________________________

fricas [B]  time = 0.46, size = 240, normalized size = 1.85 \[ -\frac {30 \, a^{2} c \cos \left (f x + e\right )^{5} - 80 \, a^{2} c \cos \left (f x + e\right )^{3} - 30 \, a^{2} c \cos \left (f x + e\right ) - 15 \, {\left (a^{2} c \cos \left (f x + e\right )^{6} - 3 \, a^{2} c \cos \left (f x + e\right )^{4} + 3 \, a^{2} c \cos \left (f x + e\right )^{2} - a^{2} c\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + 15 \, {\left (a^{2} c \cos \left (f x + e\right )^{6} - 3 \, a^{2} c \cos \left (f x + e\right )^{4} + 3 \, a^{2} c \cos \left (f x + e\right )^{2} - a^{2} c\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + 32 \, {\left (2 \, a^{2} c \cos \left (f x + e\right )^{5} - 5 \, a^{2} c \cos \left (f x + e\right )^{3}\right )} \sin \left (f x + e\right )}{480 \, {\left (f \cos \left (f x + e\right )^{6} - 3 \, f \cos \left (f x + e\right )^{4} + 3 \, f \cos \left (f x + e\right )^{2} - f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^7*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="fricas")

[Out]

-1/480*(30*a^2*c*cos(f*x + e)^5 - 80*a^2*c*cos(f*x + e)^3 - 30*a^2*c*cos(f*x + e) - 15*(a^2*c*cos(f*x + e)^6 -
 3*a^2*c*cos(f*x + e)^4 + 3*a^2*c*cos(f*x + e)^2 - a^2*c)*log(1/2*cos(f*x + e) + 1/2) + 15*(a^2*c*cos(f*x + e)
^6 - 3*a^2*c*cos(f*x + e)^4 + 3*a^2*c*cos(f*x + e)^2 - a^2*c)*log(-1/2*cos(f*x + e) + 1/2) + 32*(2*a^2*c*cos(f
*x + e)^5 - 5*a^2*c*cos(f*x + e)^3)*sin(f*x + e))/(f*cos(f*x + e)^6 - 3*f*cos(f*x + e)^4 + 3*f*cos(f*x + e)^2
- f)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^7*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)-2/f*((-17179869184/3*tan((f*x+exp(1))/2)^6*a^2*c-68719476736/5*tan((f*x+exp(1))/2)^5*a^2*c-17179869184*ta
n((f*x+exp(1))/2)^4*a^2*c-68719476736/3*tan((f*x+exp(1))/2)^3*a^2*c+17179869184*tan((f*x+exp(1))/2)^2*a^2*c+13
7438953472*tan((f*x+exp(1))/2)*a^2*c)/4398046511104+(-294*tan((f*x+exp(1))/2)^6*a^2*c-120*tan((f*x+exp(1))/2)^
5*a^2*c-15*tan((f*x+exp(1))/2)^4*a^2*c+20*tan((f*x+exp(1))/2)^3*a^2*c+15*tan((f*x+exp(1))/2)^2*a^2*c+12*tan((f
*x+exp(1))/2)*a^2*c+5*a^2*c)*1/3840/tan((f*x+exp(1))/2)^6+a^2*c/32*ln(abs(tan((f*x+exp(1))/2))))

________________________________________________________________________________________

maple [A]  time = 0.63, size = 155, normalized size = 1.19 \[ \frac {2 a^{2} c \cot \left (f x +e \right )}{15 f}+\frac {a^{2} c \cot \left (f x +e \right ) \left (\csc ^{2}\left (f x +e \right )\right )}{15 f}+\frac {a^{2} c \cot \left (f x +e \right ) \left (\csc ^{3}\left (f x +e \right )\right )}{24 f}+\frac {a^{2} c \cot \left (f x +e \right ) \csc \left (f x +e \right )}{16 f}-\frac {a^{2} c \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{16 f}-\frac {a^{2} c \cot \left (f x +e \right ) \left (\csc ^{4}\left (f x +e \right )\right )}{5 f}-\frac {a^{2} c \cot \left (f x +e \right ) \left (\csc ^{5}\left (f x +e \right )\right )}{6 f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^7*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x)

[Out]

2/15*a^2*c*cot(f*x+e)/f+1/15/f*a^2*c*cot(f*x+e)*csc(f*x+e)^2+1/24*a^2*c*cot(f*x+e)*csc(f*x+e)^3/f+1/16*a^2*c*c
ot(f*x+e)*csc(f*x+e)/f-1/16/f*a^2*c*ln(csc(f*x+e)-cot(f*x+e))-1/5/f*a^2*c*cot(f*x+e)*csc(f*x+e)^4-1/6*a^2*c*co
t(f*x+e)*csc(f*x+e)^5/f

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 232, normalized size = 1.78 \[ \frac {5 \, a^{2} c {\left (\frac {2 \, {\left (15 \, \cos \left (f x + e\right )^{5} - 40 \, \cos \left (f x + e\right )^{3} + 33 \, \cos \left (f x + e\right )\right )}}{\cos \left (f x + e\right )^{6} - 3 \, \cos \left (f x + e\right )^{4} + 3 \, \cos \left (f x + e\right )^{2} - 1} - 15 \, \log \left (\cos \left (f x + e\right ) + 1\right ) + 15 \, \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - 30 \, a^{2} c {\left (\frac {2 \, {\left (3 \, \cos \left (f x + e\right )^{3} - 5 \, \cos \left (f x + e\right )\right )}}{\cos \left (f x + e\right )^{4} - 2 \, \cos \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\cos \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\cos \left (f x + e\right ) - 1\right )\right )} + \frac {160 \, {\left (3 \, \tan \left (f x + e\right )^{2} + 1\right )} a^{2} c}{\tan \left (f x + e\right )^{3}} - \frac {32 \, {\left (15 \, \tan \left (f x + e\right )^{4} + 10 \, \tan \left (f x + e\right )^{2} + 3\right )} a^{2} c}{\tan \left (f x + e\right )^{5}}}{480 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^7*(a+a*sin(f*x+e))^2*(c-c*sin(f*x+e)),x, algorithm="maxima")

[Out]

1/480*(5*a^2*c*(2*(15*cos(f*x + e)^5 - 40*cos(f*x + e)^3 + 33*cos(f*x + e))/(cos(f*x + e)^6 - 3*cos(f*x + e)^4
 + 3*cos(f*x + e)^2 - 1) - 15*log(cos(f*x + e) + 1) + 15*log(cos(f*x + e) - 1)) - 30*a^2*c*(2*(3*cos(f*x + e)^
3 - 5*cos(f*x + e))/(cos(f*x + e)^4 - 2*cos(f*x + e)^2 + 1) - 3*log(cos(f*x + e) + 1) + 3*log(cos(f*x + e) - 1
)) + 160*(3*tan(f*x + e)^2 + 1)*a^2*c/tan(f*x + e)^3 - 32*(15*tan(f*x + e)^4 + 10*tan(f*x + e)^2 + 3)*a^2*c/ta
n(f*x + e)^5)/f

________________________________________________________________________________________

mupad [B]  time = 12.54, size = 340, normalized size = 2.62 \[ -\frac {a^2\,c\,\left (5\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{12}-5\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{12}-12\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{11}+12\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{11}\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )-15\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}-20\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9+15\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+120\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7-120\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5-15\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+20\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+15\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+120\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\ln \left (\frac {\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\right )}{1920\,f\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,{\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + a*sin(e + f*x))^2*(c - c*sin(e + f*x)))/sin(e + f*x)^7,x)

[Out]

-(a^2*c*(5*cos(e/2 + (f*x)/2)^12 - 5*sin(e/2 + (f*x)/2)^12 - 12*cos(e/2 + (f*x)/2)*sin(e/2 + (f*x)/2)^11 + 12*
cos(e/2 + (f*x)/2)^11*sin(e/2 + (f*x)/2) - 15*cos(e/2 + (f*x)/2)^2*sin(e/2 + (f*x)/2)^10 - 20*cos(e/2 + (f*x)/
2)^3*sin(e/2 + (f*x)/2)^9 + 15*cos(e/2 + (f*x)/2)^4*sin(e/2 + (f*x)/2)^8 + 120*cos(e/2 + (f*x)/2)^5*sin(e/2 +
(f*x)/2)^7 - 120*cos(e/2 + (f*x)/2)^7*sin(e/2 + (f*x)/2)^5 - 15*cos(e/2 + (f*x)/2)^8*sin(e/2 + (f*x)/2)^4 + 20
*cos(e/2 + (f*x)/2)^9*sin(e/2 + (f*x)/2)^3 + 15*cos(e/2 + (f*x)/2)^10*sin(e/2 + (f*x)/2)^2 + 120*cos(e/2 + (f*
x)/2)^6*log(sin(e/2 + (f*x)/2)/cos(e/2 + (f*x)/2))*sin(e/2 + (f*x)/2)^6))/(1920*f*cos(e/2 + (f*x)/2)^6*sin(e/2
 + (f*x)/2)^6)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**7*(a+a*sin(f*x+e))**2*(c-c*sin(f*x+e)),x)

[Out]

Timed out

________________________________________________________________________________________